﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Consume.aspx.cs" Inherits="WISD.CarFriend.Web.Admin.OA.ConsumeManage.Consume" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>会员卡消费管理</title>
    <link href="../../Content/CSS/ClientCSS/qlsale.css" rel="stylesheet" type="text/css" />
    <link href="../../Content/CSS/ClientCSS/Table.css" rel="stylesheet" type="text/css" />
    <link href="../../Content/CSS/ClientCSS/blue.css" rel="stylesheet" type="text/css" />
    <script src="/Admin/Scripts/ClientScripts/Page.js" type="text/javascript"></script>
    <script src="/Admin/Scripts/ClientScripts/CodyyForm.js" type="text/javascript"></script>
    <script src="/Admin/Scripts/ClientScripts/jquery-1.4.1.js" type="text/javascript"></script>
    <script src="/Admin/Scripts/DatePicker/WdatePicker.js" type="text/javascript"></script>
    <script src="/Admin/Scripts/ClientScripts/SplitPage.js" type="text/javascript"></script>
    <script src="/Admin/Scripts/ClientScripts/jquery.artDialog.min.js" type="text/javascript"></script>
    <script src="../../Scripts/WisdScript/Common.js" type="text/javascript"></script>
</head>
<body>
    <div style="height: auto;">
        <table class="adduser" align="center" border="0" cellpadding="0" cellspacing="0"
            width="100%" bgcolor="#F2F7F5">
            <tbody>
                <tr>
                    <td colspan="6" class="bigTitle" height="40">
                        <strong>会员卡消费管理</strong>
                    </td>
                </tr>
                <tr>
                </tr>
                <tr>
                    <td class="sctitle" style="width: 81px;">
                        会员卡号：
                    </td>
                    <td style="width: 162px;">
                        <input id="txtVipCId" class="xstxt" type="text" />
                    </td>
                    <td class="sctitle" style="width: 50px;">
                    </td>
                    <td class="sctitle" style="width: 81px;">
                        会员姓名：
                    </td>
                    <td>
                        <input id="txtVipSearchName" class="xstxt" type="text" />
                    </td>
                </tr>
                <tr>
                    <td class="sctitle" style="width: 81px;">
                        会员编号：
                    </td>
                    <td style="width: 162px;">
                        <input id="txtVipId" class="xstxt" type="text" />
                    </td>
                    <td class="sctitle" style="width: 50px;">
                    </td>
                    <td class="sctitle" style="width: 81px;">
                        消费项目：
                    </td>
                    <td>
                        <input id="txtConsumeIDItem" name="txtConsumeIDItem" class="xstxt" type="text" />
                    </td>
                </tr>
                <tr>
                    <td class="sctitle" style="width: 81px;">
                        消费时间：
                    </td>
                    <td colspan="6">
                        <input id="txtConsumeTime" name="txtConsumeTime" onclick="WdatePicker()" class="xstxt"
                            type="text" />
                        -
                        <input id="txtConsumeEndTime" name="txtConsumeEndTime" onclick="WdatePicker()" class="xstxt"
                            type="text" />
                    </td>
                </tr>
                <tr>
                    <td class="sctitle" style="width: 81px;">
                        消费地点：
                    </td>
                    <td colspan="6">
                        <select id="txtConsumeLocation" style="width: 315px;">
                        </select>
                    </td>
                </tr>
                <tr>
                    <td colspan="6" class="fenline">
                        &nbsp;
                        <input value="搜索" class="twobtn" type="button" id="btnSearch" />&nbsp;&nbsp;
                        <input class="twobtn" value="新增" type="button" id="btnAdd" />&nbsp;
                    </td>
                </tr>
                <tr>
                    <td colspan="6">
                        <table rules="all" class="tableStyle">
                            <thead>
                                <tr>
                                    <th scope="col" style="display: none;">
                                        序号
                                    </th>
                                    <th scope="col">
                                        会员卡号
                                    </th>
                                    <th scope="col">
                                        会员编号
                                    </th>
                                    <th scope="col">
                                        会员车号
                                    </th>
                                    <th scope="col">
                                        消费时间
                                    </th>
                                    <th scope="col">
                                        消费地点
                                    </th>
                                    <th scope="col">
                                        消费项目
                                    </th>
                                    <th scope="col">
                                        备注
                                    </th>
                                </tr>
                            </thead>
                            <tbody id="databody">
                            </tbody>
                            <tfoot id="footer" class="div_footer">
                            </tfoot>
                        </table>
                    </td>
                </tr>
            </tbody>
        </table>
    </div>
    <div id="registerdiv" class="registerdiv" style="width: 620px;">
        <table class="addTable" align="center" border="0" cellpadding="0" cellspacing="0"
            width="100%" style="margin-right: 20px;">
            <tbody>
                <tr class="topTitle">
                    <td colspan="4" style="margin-top: -3px;">
                        <ul>
                            <li class="leftli">会员卡消费管理</li>
                            <li class="rightli" onclick="$('#registerdiv').hide();">
                                <img alt="关闭" title="关闭" id="close" src="/Admin/Content/Images/tdClose_Hover.png" /></li>
                        </ul>
                    </td>
                </tr>
                <tr>
                    <td class="sctitle_four">
                        会员卡号：
                    </td>
                    <td>
                        <input id="MemberCardID" name="MemberCardID" class="stxt" type="text" reg="\S" needcheck="yes"
                            tip="['会员卡号不能为空','只能为中英文','长度在1-50之间']" scope="1,50" clear="yes">
                        <span></span>
                        <%--<input value="查询" class="twobtn" type="button" id="btnQuery" />--%>
                    </td>
                    <td class="sctitle_four">
                        会员卡状态：
                    </td>
                    <td>
                        <input id="State" name="State" class="stxt txtgray" type="text" readonly="readonly"
                            clear='yes'>
                        <span></span>
                    </td>
                </tr>
                <tr>
                    <td class="sctitle_four">
                        会员编号：
                    </td>
                    <td>
                        <input id="MemberID" name="MemberID" class="stxt txtgray" type="text" class="txtgray"
                            clear='yes' readonly="readonly">
                        <span></span>
                    </td>
                    <td class="sctitle_four">
                        会员姓名：
                    </td>
                    <td>
                        <input id="txtVipName" name="txtVipName" class="stxt txtgray" type="text" class="txtgray"
                            clear='yes' readonly="readonly">
                        <span></span>
                    </td>
                </tr>
                <tr>
                    <td class="sctitle_four">
                        剩余金额：
                    </td>
                    <td>
                        <input id="ResidualAmount" name="ResidualAmount" class="stxt txtgray" type="text"
                            clear='yes' class="txtgray" readonly="readonly">
                        <span></span>
                    </td>
                    <td class="sctitle_four">
                        消费时间：
                    </td>
                    <td>
                        <input id="ConsumeTime" name="ConsumeTime" class="stxt" type="text" reg="^\d{4}(\-|\/|.)\d{1,2}\1\d{1,2}$"
                            needcheck="yes" tip="['消费时间不能为空','格式不对']" clear="yes">
                        <span></span>
                    </td>
                </tr>
                <tr>
                    <td class="sctitle_four">
                        消费项目：
                    </td>
                    <td>
                        <select id="ConsumeIDItem" style="width: 120px">
                        </select>
                    </td>
                    <td class="sctitle_four">
                        消费金额：
                    </td>
                    <td>
                        <input id="ConsumeAmount" name="ConsumeAmount" class="stxt" type="text" reg="^[0-9]\d*$"
                            needcheck="yes" tip="['消费金额不能为空','只能为正整数','长度在1-50之间']" scope="1,50" clear="yes">
                        <span></span>
                    </td>
                </tr>
                <tr>
                    <td class="sctitle_four">
                        实收金额:
                    </td>
                    <td>
                        <input id="PaidAmount" name="PaidAmount" class="stxt" type="text" reg="^[0-9]\d*$"
                            needcheck="yes" tip="['实收金额不能为空','只能为正整数','长度在1-50之间']" scope="1,50" clear="yes">
                        <span></span>
                    </td>
                </tr>
                <tr>
                    <td class="sctitle_four">
                        消费地点：
                    </td>
                    <td colspan="3">
                        <select id="ConsumeLocation" style="width: 300px">
                        </select>
                    </td>
                </tr>
                <tr>
                    <td class="sctitle_four">
                        备注：
                    </td>
                    <td colspan="3">
                        <textarea id="Memo" cols="30" rows="5" style="overflow: hidden; display: block; resize: none;"
                            clear='yes'></textarea>
                    </td>
                </tr>
                <tr>
                    <td colspan="4" style="height: 15px;">
                    </td>
                </tr>
                <tr>
                    <td id="btnGroup" colspan="4" align="center" style="text-align: center;">
                        <input value="修改" id="btnEdit" class="twobtn" type="button" />&nbsp;&nbsp;
                        <input value="确定" id="btnSave" class="twobtn" type="button" />&nbsp;&nbsp;
                        <input id="btnRest" class="twobtn" value="重置" type="button" />
                    </td>
                </tr>
            </tbody>
        </table>
    </div>
    <div id="clientdiv" style="margin: 0 auto; width: 500px; overflow: hidden; display: block;
        border: 1px solid gray; display: none;">
        <table border="0" cellpadding="0" cellspacing="4" width="100%" class="tableStyle">
            <thead>
                <tr style="background-color: #EDEDED;">
                    <th scope="col">
                        编号
                    </th>
                    <th scope="col">
                        会员卡编号
                    </th>
                    <th scope="col">
                        会员编号
                    </th>
                    <th scope="col">
                        会员姓名
                    </th>
                    <th scope="col">
                        会员卡状态
                    </th>
                    <th scope="col">
                        余额(元)
                    </th>
                    <th scope="col">
                        操作
                    </th>
                </tr>
            </thead>
            <tbody id="Tbody1">
            </tbody>
            <tfoot id="Tfoot1" class="div_footer">
            </tfoot>
        </table>
    </div>
    <div id="checkPwddiv" class="registerdiv" style="width: 320px;">
        <table class="addTable" align="center" border="0" cellpadding="0" cellspacing="0"
            width="100%" style="margin-right: 20px;">
            <tbody>
                <tr class="topTitle">
                    <td colspan="4" style="margin-top: -3px;">
                        <ul>
                            <li class="leftli">密码确认</li>
                            <li class="rightli" onclick="$('#checkPwddiv').hide();">
                                <img alt="关闭" title="关闭" id="Img1" src="/Admin/Content/Images/tdClose_Hover.png" /></li>
                        </ul>
                    </td>
                </tr>
                <tr>
                    <td class="sctitle_four">
                        请输入密码:
                    </td>
                    <td colspan="3">
                        <input id="txtpwd" name="txtpwd" class="stxt" type="password" reg="^[A-Za-z0-9_-]+$"
                            needcheck="yes" tip="['会员卡密码不能为空','只能为数字字母下划线','长度在1-50之间']" scope="1,50" clear="yes" />
                        <span></span>
                    </td>
                </tr>
                <tr>
                    <tr>
                        <td colspan="4" style="height: 15px;">
                        </td>
                    </tr>
                    <tr>
                        <td id="Td1" colspan="4" align="center" style="text-align: center;">
                            <input value="确定" id="btnCheck" class="twobtn" type="button" />
                        </td>
                    </tr>
            </tbody>
        </table>
    </div>
    <div id="ConsumeHistoryDiv" style="margin: 0 auto; width: 600px; overflow: hidden;
        display: block; border: 1px solid gray; display: none;">
        <table border="0" cellpadding="0" cellspacing="4" width="100%" class="tableStyle">
            <thead>
                <tr style="background-color: #EDEDED;">
                    <th scope="col">
                        序号
                    </th>
                    <th scope="col">
                        消费时间
                    </th>
                    <th scope="col">
                        消费地点
                    </th>
                    <th scope="col">
                        消费项目
                    </th>
                    <th scope="col">
                        消费金额
                    </th>
                    <th scope="col">
                        实收金额
                    </th>
                </tr>
            </thead>
            <tbody id="Tbody2">
            </tbody>
            <tfoot id="Tfoot2" class="div_footer">
            </tfoot>
        </table>
        <table width="100%">
            <tr>
                <td>
                </td>
            </tr>
            <tr>
                <td align="center">
                    <input value="确定" id="btnCheckSave" class="twobtn" type="button" />
                </td>
            </tr>
            <tr>
                <td>
                </td>
            </tr>
        </table>
    </div>
</body>
</html>
<script type="text/javascript">
    $("#Tbody1").click(function (e) {
        var that = this;
        var e = e || window.event;
        var target = e.srcElement || e.target;
        if ($(target).is("a")) {
            var action = $(target).attr("action");
            var main = $(target).parent().parent().attr("main");
            if (!action.localeCompare("choose")) {
                $("#MemberCardID").val(main);
                getPersonInfo({ "MemberCardID": main });
                artDialog.close();
            }
            (! -[1, ]) ? e.cancelBubble = true : e.stopPropagation();
        }
    });

    $("#btnQuery").click(function () {
        var Condition = "";
        SplitPage.GetData({ "Control": "/Admin/Control/Consume.ashx", "Action": "GetCardDetail", "first": true, "colspan": 7, "Condition": Condition, "databody": "Tbody1", "footer": "Tfoot1" });
        artDialog = $.dialog({
            title: "会员卡信息"
            , content: document.getElementById("clientdiv")
            , padding: "0", lock: true, esc: true
        });
    });

    $("#MemberCardID").keypress(function (e) {
        var key = e.which;    //e.which是按键的值
        if (key == 13) {
            getPersonInfo({ MemberCardID: $.trim(this.value) });
        }
    });

    //赋值操作
    function EditEntity() {
        var rs = Page.Static.Rs[0];
        $("#MemberCardID").val(rs["MemberCardID"]);
        $("#State").val(rs["State"]);
        $("#MemberID").val(rs["MemberID"]);
        $("#txtVipName").val(rs["Name"]);
        $("#ResidualAmount").val(rs["ResidualAmount"]);
        $("#ConsumeTime").val(rs["consumeTime"].split(" ")[0]);
        $("#ConsumeLocation").html("<option>" + rs["ConsumeLocation"] + "</option>");
        $("#ConsumeIDItem").html("<option>" + rs["ConsumeIDItem"] + "</option>");
        $("#ConsumeAmount").val(rs["ConsumeAmount"]);
        $("#PaidAmount").val(rs["PaidAmount"]);
        $("#Memo").val(rs["Memo"]);
    };

    //专门用来保存某个记录的详细消息
    var rs = {};
    $(function () {
        var MainPK = "";
        var Condition = "";
        var CurrentPage = 1;

        //失去焦点验证
        Form.Blur({ id: "registerdiv" });

        //添加修改记录
        var setEntity = function (obj) {
            var _$ = function (id) { return document.getElementById(id); };
            var data = {
                Action: obj.Action
                      , MemberCardID: $.trim($("#MemberCardID").val())
                      , ConsumeTime: $.trim($("#ConsumeTime").val())
                      , ConsumeLocation: $.trim($("#ConsumeLocation  option:selected'").text())
                      , ShopName: $.trim($("#ConsumeLocation  option:selected'").attr("ShopName"))
                      , ShopLeader: $.trim($("#ConsumeLocation  option:selected'").attr("ShopLeader"))
                      , ConsumeIDItem: $.trim($("#ConsumeIDItem").val())
                      , ConsumeAmount: $.trim($("#ConsumeAmount").val())
                      , PaidAmount: $.trim($("#PaidAmount").val())
                      , Memo: $.trim($("#Memo").val())
                      , Reviser: ""
                      , ReviseDate: ""
            };
            if (obj.Action == "EditEntity") { data["Main"] = obj.Main; }
            $.post("/Admin/Control/Consume.ashx", data, function (data) {
                if (data.split(",")[0] === "Success") {
                    if (obj.Action == "AddEntity") {
                        alert("添加成功!");
                        Condition = GetCondition();
                        CurrentPage = Page.Static.CurrentPage;
                        InitPage();
                    }
                    artDialog.close();
                    $("#registerdiv").hide();
                }
                else {
                    alert("添加失败!");
                }
            });
        }

        //获取查询条件
        var GetCondition = function () {
            var MemberCardID = $("#txtVipCId").val() || "0"; //会员卡编号
            var MemberID = $("#txtVipId").val() || "0"; //会员编号
            var VipName = $("#txtVipSearchName").val() || "0";  //会员姓名
            var ConsumeTime = $("#txtConsumeTime").val() || "0";  //消费开始时间
            var ConsumeEndTime = $("#txtConsumeEndTime").val() || "0";  //消费结束时间
            var ConsumeLocation = $("#txtConsumeLocation  option:selected'").text() || "0";  //消费地点
            var ConsumeIDItem = $("#txtConsumeIDItem").val() || "0";  //消费项目
            ConsumeLocation = ConsumeLocation == "---请选择---" ? "0" : ConsumeLocation;
            return MemberCardID + "@" + MemberID + "@" + VipName + "@" + ConsumeTime + "@" + ConsumeLocation + "@" + ConsumeIDItem + "@" + ConsumeEndTime;
        };

        //加载数据
        var InitPage = function () {
            Page.GetData({ "Control": "/Admin/Control/Consume.ashx", "Action": "Init", "first": true, "colspan": 8,
                "Condition": Condition, "databody": "databody", "footer": "footer", "ActionBtn": ""
            });
        };

        $(document).ready(function () {
            $.post("/Admin/Control/Consume.ashx", { Action: "GetConsumeLocation" }, function (data) {
                if (!data) {
                    $("#btnAdd").attr('disabled', true);
                    $("#btnSearch").attr('disabled', true);
                    alert("当前登录用户没有对应的特约商户\r\r无法执行[搜索]和[新增]功能！");
                    return;
                }
                var jsonArr = eval("(" + data + ")");
                var citystr = "";
                if (jsonArr.length != 1) {
                    citystr = "<option value=0>---请选择---</option>";
                }
                for (var i = 0; i < jsonArr.length; i++) {
                    citystr += "<option value=" + jsonArr[i]["Id"] + ">" + jsonArr[i]["Address"] + "</option>";
                }
                $("#txtConsumeLocation").html(citystr).change();

                //第一次加载数据
                Condition = GetCondition();
                InitPage();
            });
        });

        //重置表单
        var ResetForm = function () {
            $("#registerdiv .addTable").find("input[type='text'][clear='yes'],textarea[clear='yes']").val("");
            $("#registerdiv .addTable").find("input,textarea,select").attr("disabled", false);
        };

        //点击搜索按钮
        $("#btnSearch").click(function () {
            Condition = GetCondition();
            CurrentPage = 1;
            InitPage();
        });

        //点击新增按钮
        $("#btnAdd").click(function () {
            ResetForm();
            $("#btnSave,#btnRest").show();
            $("#btnEdit").hide();
            $("#ConsumeIDItem").html("");
            $("#registerdiv .leftli").html("添加会员卡消费信息");
            GetConsumeLocation();
            Page.divCenter($("#registerdiv")[0]);
        });

        //点击保存按钮
        $("#btnSave").click(function () {
            var Result = Form.Validator({ id: "registerdiv" });
            if (Result) {
                if (parseInt($("#ResidualAmount").val()) - parseInt($("#ConsumeAmount").val()) < 0) {
                    alert("此会员卡余额不足，无法消费，请先充值！");
                    return;
                }
                $.post("/Admin/Control/Recharge.ashx", { "Action": "CheckMemberState", "MemberCardID": $.trim($("#MemberCardID").val()) }, function (data) {
                    if (data.split(",")[0] === "Success") {
                        $("#checkPwddiv .leftli").html("会员卡密码确认");
                        $("#txtpwd").val("");
                        Page.divCenter($("#checkPwddiv")[0]);
                    }
                    else {
                        alert("会员卡状态处于非正常状态，不可充值！请先修改会员卡状态！");
                    }
                });
            }
        });

        $("#btnCheckSave").click(function () {
            if (ExpirationDate == "1") {
                alert("对不起，您的会员卡已到期，无法消费！");
                return;
            }
            setEntity({ "Action": "AddEntity" });
        });

        //点击重置按钮
        $("#btnRest").click(function () {
            $("#ConsumeIDItem").html("");
            ResetForm();
        });

        //点击修改按钮
        $("#btnEdit").click(function () {
            setEntity({ "Action": "EditEntity", "Main": MainPK });
        });

        //在Table中点击修改、删除 
        $("#databody").dblclick(function (e) {    //双击查看详细信息
            var that = this;
            var e = e || window.event;
            var target = e.srcElement || e.target;
            if ($(target.parentNode).is("tr")) {
                var main = $(target.parentNode).attr("main");
                ResetForm();
                $("#btnEdit,#btnSave,#btnRest").hide();
                $("#registerdiv .addTable").find("input,textarea,select").attr("disabled", true);
                $("#registerdiv .leftli").html("会员卡详细信息");
                var divobj = $("#registerdiv");
                Page.divCenter(divobj[0]).GetOne({ "Main": main });
                (! -[1, ]) ? e.cancelBubble = true : e.stopPropagation();
            }
        });
    });

    $("#MemberCardID").change(function () {
        getPersonInfo({ MemberCardID: $.trim(this.value) });
    }).blur(function () {
        getPersonInfo({ MemberCardID: $.trim(this.value) });
    });

    $("#ConsumeIDItem").change(function () {
        var argClass = $("#ConsumeIDItem  option:selected'").attr("lang");
        if (argClass == "1") {   //固定消费时间
            $("#ConsumeTime").unbind();
            $("#ConsumeTime").val(getNowFormatDate()).addClass("txtgray");
            $("#ConsumeTime").attr("disabled", "disabled");
        }
        else {
            $("#ConsumeTime").val("").removeClass("txtgray");
            $("#ConsumeTime").removeAttr("disabled");
            $("#ConsumeTime").bind("click", function () { WdatePicker(); });
        }
    });

    //获取消费地点
    var GetConsumeLocation = function () {
        $.post("/Admin/Control/Consume.ashx", { Action: "GetConsumeLocation" }, function (data) {
            if (!data) {
                $("#ConsumeLocation").html("<option value=''>无</option>");
                return;
            }
            var jsonArr = eval("(" + data + ")");
            var citystr = "";
            for (var i = 0; i < jsonArr.length; i++) {
                citystr += "<option value=" + jsonArr[i]["Id"] + " ShopName=" + jsonArr[i]["ShopName"] + " ShopLeader=" + jsonArr[i]["Leader"] + ">" + jsonArr[i]["Address"] + "</option>";
            }
            $("#ConsumeLocation").html(citystr).change();
        });
    };

    //输入会员卡号,获取会员的相关信息
    var getPersonInfo = function (obj) {
        $.post("/Admin/Control/Consume.ashx", { Action: "GetCardInfo", MemberCardID: obj.MemberCardID }, function (data) {
            if (!data) {
                $("#btnGroup").hide();
                $("#State").val("");
                $("#MemberID").val("");
                $("#txtVipName").val("");
                $("#ResidualAmount").val("");
                return;
            }
            $("#btnGroup").show();
            var jsonArr = eval("(" + data + ")");
            for (var i = 0; i < jsonArr.length; i++) {
                $("#State").val(jsonArr[i]["State"]).addClass("txtgray");
                $("#MemberID").val(jsonArr[i]["MemberID"]).addClass("txtgray");
                $("#txtVipName").val(jsonArr[i]["Name"]).addClass("txtgray");
                $("#ResidualAmount").val(jsonArr[i]["ResidualAmount"]).addClass("txtgray");
            }
            getMemberConsumeItem(obj.MemberCardID);
        });
    };

    //根据会员卡号，获取消费项目
    var getMemberConsumeItem = function (obj) {
        $.post("/Admin/Control/Consume.ashx", { Action: "GetMemberConsumeItem", MemberCardID: obj }, function (data) {
            if (!data) {
                $("#ConsumeIDItem").html("<option value=''>无</option>");
                return;
            }
            var jsonArr = eval("(" + data + ")");
            var citystr = "";
            for (var i = 0; i < jsonArr.length; i++) {
                citystr += "<option value=" + jsonArr[i]["ConsumeItemId"] + " lang=" + jsonArr[i]["Memo1"] + " >" + jsonArr[i]["ConsumeItem"] + "</option>";
            }
            $("#ConsumeIDItem").html(citystr).change();
        });
    };

    var ExpirationDate = "";
    var artDialog;
    $("#btnCheck").click(function () {
        var Result = Form.Validator({ id: "checkPwddiv" });
        if (Result) {
            var pwd = $("#txtpwd").val();
            var memberCardID = $("#MemberCardID").val();
            $.post("/Admin/Control/Consume.ashx", { Action: "CheckMemberPWD", MemberPWD: pwd, MemberCardID: memberCardID }, function (data) {
                ExpirationDate = data.split(",")[0];
                if (ExpirationDate === "Failure") {
                    alert("输入的密码与当前会员密码不一致，请重新输入！");
                    return;
                }
                $("#checkPwddiv").hide();
                SplitPage.GetData({ "Control": "/Admin/Control/Consume.ashx", "Action": "GetConsumeHistory", "first": true, "colspan": 6, "Condition": memberCardID, "databody": "Tbody2", "footer": "Tfoot2", "PageName": "NoOperation" });
                artDialog = $.dialog({
                    title: "会员消费记录"
            , content: document.getElementById("ConsumeHistoryDiv")
            , padding: "0", lock: true, esc: true
                });
            });
        }
    });
</script>
